import { post } from "utils/fetch";

const PREFIX = "/flow-platform";

// 工作日设置列表查询
export const getWorkingDayList = () => post(`${PREFIX}/calendar/listWorkingDay`);

// 节假日和例外设置列表查询
export const getOffDayList = ({ year, month }) => post(`${PREFIX}/calendar/listOffDayAndException`, {
  year,
  month,
});

// 工作日和节假日以及例外设置新增
export const addWorkingAndOffDay = ({
                                      workingDays, offDays,
                                    }) => {
  return post(`${PREFIX}/calendar/addWorkingDayAndOffDay`, {
    workingDays, offDays,
  });
};
